/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';

class viewC extends Component {
  render() {
    return (
      <View style={styles.container}>
        <View style={[styles.item,styles.center]}>
          <Text style={styles.text}>酒店</Text>
        </View>
        <View style={[styles.item]}>
          <View style={[styles.center,styles.flex]}>
            <Text style={styles.text}>海外酒店</Text>
          </View>
           <View style={[styles.center,styles.flex]}>
            <Text style={styles.text}>特惠酒店</Text>
          </View>
        </View>
          <View style={[styles.item]}>
            <View style={[styles.center,styles.flex]}>
              <Text style={styles.text}>团购</Text>
            </View>
            <View style={[styles.center,styles.flex]}>
              <Text style={styles.text}>团购</Text>
            </View>
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    flexDirection:'row',
  },
  item: {
    flex: 1,
    height:80,
    borderRightColor:'blue',
    backgroundColor:"red",
    borderWidth:1,
  },
  center:{
    justifyContent:'center',
    alignItems:'center',
  },
  flex:{
    flex:1,
  },
  text:{
    color:"white",
  },
});

AppRegistry.registerComponent('viewC', () => viewC);
